<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>积分任务 - 邻里社区</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }
        
        /* 头部样式 */
        header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 15px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            font-size: 28px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .points, .task-btn {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .points:hover, .task-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .task-dropdown {
            position: relative;
            display: inline-block;
        }
        
        .task-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 180px;
            padding: 10px 0;
            margin-top: 10px;
            z-index: 1000;
        }
        
        .task-menu a {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            transition: all 0.2s ease;
        }
        
        .task-menu a:hover {
            background: #f0f5ff;
            color: #2575fc;
        }
        
        .task-menu a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .task-dropdown:hover .task-menu {
            display: block;
        }
        
        /* 返回按钮 */
        .back-button {
            display: inline-flex;
            align-items: center;
            padding: 10px 15px;
            margin-bottom: 20px;
            cursor: pointer;
            color: #3498db;
            font-weight: 600;
            border-radius: 5px;
            transition: background 0.3s ease;
        }
        
        .back-button:hover {
            background: #f0f5ff;
        }
        
        .back-button i {
            margin-right: 5px;
        }
        
        /* 页面标题 */
        .page-title {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .page-title i {
            margin-right: 10px;
            color: #3498db;
        }
        
        /* 任务卡片 */
        .task-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            margin: 30px 0;
        }
        
        .task-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }
        
        .task-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
        }
        
        .task-header {
            padding: 20px;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .task-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }
        
        .task-title {
            font-size: 18px;
            font-weight: 600;
        }
        
        .task-content {
            padding: 20px;
        }
        
        .task-desc {
            font-size: 14px;
            color: #7f8c8d;
            margin-bottom: 15px;
        }
        
        .task-points {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 18px;
            font-weight: 700;
            color: #e74c3c;
            margin-bottom: 15px;
        }
        
        .task-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .task-status {
            font-size: 14px;
            padding: 5px 10px;
            border-radius: 15px;
            background: #f0f5ff;
            color: #3498db;
        }
        
        .task-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: background 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .task-btn:hover {
            background: #2980b9;
        }
        
        /* 任务详情页 */
        .task-detail-page {
            background: white;
            border-radius: 10px;
            padding: 25px;
            margin: 20px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .task-detail-header {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #eee;
        }
        
        .task-detail-icon {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: white;
        }
        
        .task-detail-title {
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .task-detail-points {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 22px;
            font-weight: 700;
            color: #e74c3c;
        }
        
        .task-detail-content {
            margin-bottom: 25px;
        }
        
        .task-detail-desc {
            font-size: 16px;
            line-height: 1.8;
            color: #555;
            margin-bottom: 20px;
        }
        
        .task-rules {
            background: #f9f9f9;
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        
        .rules-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .rules-list {
            list-style: none;
        }
        
        .rules-list li {
            margin-bottom: 10px;
            padding-left: 25px;
            position: relative;
        }
        
        .rules-list li:before {
            content: "•";
            color: #3498db;
            font-weight: bold;
            position: absolute;
            left: 10px;
        }
        
        .task-action {
            text-align: center;
            margin-top: 30px;
        }
        
        .action-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 15px 40px;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 600;
            font-size: 18px;
            transition: background 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        
        .action-btn:hover {
            background: #2980b9;
        }
        
        .action-btn.completed {
            background: #27ae60;
        }
        
        .task-stats {
            display: flex;
            justify-content: space-around;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .stat-label {
            font-size: 14px;
            color: #7f8c8d;
        }
        
        /* 签到日历 */
        .calendar {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 10px;
            margin: 20px 0;
        }
        
        .calendar-header {
            grid-column: span 7;
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 10px;
            text-align: center;
        }
        
        .weekday {
            font-weight: 600;
            color: #3498db;
            text-align: center;
            padding: 10px;
        }
        
        .day {
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            cursor: pointer;
            background: #f5f7fa;
        }
        
        .day.checked {
            background: #3498db;
            color: white;
        }
        
        .day.today {
            border: 2px solid #3498db;
        }
        
        /* 页脚样式 */
        footer {
            background: #2c3e50;
            color: #ecf0f1;
            padding: 30px 0;
            margin-top: 40px;
        }
        
        .footer-content {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 30px;
        }
        
        .footer-section {
            flex: 1;
            min-width: 200px;
        }
        
        .footer-section h3 {
            font-size: 18px;
            margin-bottom: 15px;
            position: relative;
            padding-bottom: 10px;
        }
        
        .footer-section h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: #3498db;
        }
        
        .footer-section ul {
            list-style: none;
        }
        
        .footer-section ul li {
            margin-bottom: 10px;
        }
        
        .footer-section ul li a {
            color: #bdc3c7;
            text-decoration: none;
            transition: color 0.3s ease;
        }
        
        .footer-section ul li a:hover {
            color: #3498db;
        }
        
        .copyright {
            text-align: center;
            padding-top: 20px;
            margin-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #bdc3c7;
            font-size: 14px;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
            }
            
            .task-cards {
                grid-template-columns: 1fr;
            }
            
            .task-detail-header {
                flex-direction: column;
                text-align: center;
            }
            
            .task-stats {
                flex-direction: column;
                gap: 20px;
            }
            
            .footer-content {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container">
            <div class="header-content">
                <div class="logo">
                    <i class="fas fa-store"></i>
                    <span>邻里社区积分商城</span>
                </div>
                <div class="user-info">
                    <div class="points" onclick="showPage('points-page')">
                        <i class="fas fa-coins"></i>
                        <span>我的积分: 2,580</span>
                    </div>
                    <div class="task-dropdown">
                        <div class="task-btn">
                            <i class="fas fa-tasks"></i>
                            <span>积分任务</span>
                        </div>
                        <div class="task-menu">
                            <a href="#" onclick="showPage('checkin-task'); return false;">
                                <i class="fas fa-calendar-check"></i>
                                <span>每日签到</span>
                            </a>
                            <a href="#" onclick="showPage('post-task'); return false;">
                                <i class="fas fa-edit"></i>
                                <span>发布帖子</span>
                            </a>
                            <a href="#" onclick="showPage('help-task'); return false;">
                                <i class="fas fa-hands-helping"></i>
                                <span>完成求助</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 主要内容 -->
    <div class="container">
        <!-- 任务列表页 -->
        <div class="page active" id="tasks-page">
            <div class="page-title">
                <i class="fas fa-tasks"></i>
                <span>积分任务中心</span>
            </div>
            
            <p style="margin-bottom: 30px; color: #7f8c8d;">完成以下任务可以获得积分，积分可用于兑换商城商品</p>
            
            <div class="task-cards">
                <!-- 签到任务 -->
                <div class="task-card" onclick="showPage('checkin-task')">
                    <div class="task-header">
                        <div class="task-icon">
                            <i class="fas fa-calendar-check"></i>
                        </div>
                        <div class="task-title">每日签到</div>
                    </div>
                    <div class="task-content">
                        <p class="task-desc">每天签到可获得积分，连续签到有额外奖励</p>
                        <div class="task-points">
                            <i class="fas fa-coins"></i>
                            <span>+5 积分/天</span>
                        </div>
                        <div class="task-footer">
                            <div class="task-status">今日已签到</div>
                            <button class="task-btn">
                                <i class="fas fa-arrow-right"></i>
                                <span>去完成</span>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 发帖任务 -->
                <div class="task-card" onclick="showPage('post-task')">
                    <div class="task-header">
                        <div class="task-icon">
                            <i class="fas fa-edit"></i>
                        </div>
                        <div class="task-title">发布帖子</div>
                    </div>
                    <div class="task-content">
                        <p class="task-desc">在社区发布优质帖子可获得积分奖励</p>
                        <div class="task-points">
                            <i class="fas fa-coins"></i>
                            <span>+20 积分/篇</span>
                        </div>
                        <div class="task-footer">
                            <div class="task-status">今日已完成</div>
                            <button class="task-btn">
                                <i class="fas fa-arrow-right"></i>
                                <span>去完成</span>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 求助任务 -->
                <div class="task-card" onclick="showPage('help-task')">
                    <div class="task-header">
                        <div class="task-icon">
                            <i class="fas fa-hands-helping"></i>
                        </div>
                        <div class="task-title">完成求助</div>
                    </div>
                    <div class="task-content">
                        <p class="task-desc">帮助社区其他成员解决问题可获得积分</p>
                        <div class="task-points">
                            <i class="fas fa-coins"></i>
                            <span>+10~50 积分/次</span>
                        </div>
                        <div class="task-footer">
                            <div class="task-status">进行中</div>
                            <button class="task-btn">
                                <i class="fas fa-arrow-right"></i>
                                <span>去完成</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 签到任务详情页 -->
        <div class="page" id="checkin-task">
            <div class="back-button" onclick="showPage('tasks-page')">
                <i class="fas fa-arrow-left"></i>
                <span>返回任务中心</span>
            </div>
            
            <div class="task-detail-page">
                <div class="task-detail-header">
                    <div class="task-detail-icon">
                        <i class="fas fa-calendar-check"></i>
                    </div>
                    <div>
                        <h1 class="task-detail-title">每日签到</h1>
                        <div class="task-detail-points">
                            <i class="fas fa-coins"></i>
                            <span>+5 积分/天 (连续7天额外奖励30积分)</span>
                        </div>
                    </div>
                </div>
                
                <div class="task-detail-content">
                    <p class="task-detail-desc">
                        每天签到即可获得5积分奖励，连续签到7天可额外获得30积分奖励。
                        签到是获取积分最简单的方式，记得每天来签到哦！
                    </p>
                    
                    <div class="task-rules">
                        <h3 class="rules-title">
                            <i class="fas fa-info-circle"></i>
                            <span>签到规则</span>
                        </h3>
                        <ul class="rules-list">
                            <li>每天只能签到一次</li>
                            <li>签到时间为00:00-23:59</li>
                            <li>连续签到7天可获得额外30积分奖励</li>
                            <li>中断签到后连续天数将重新计算